
package Client;

import GUI.panelChat1;

public class MessageDisplayer implements Runnable
   {
      private String fromUser; // user from which message came
      private String messageBody; // body of message
      private panelChat1 area;

      // MessageDisplayer constructor
      public MessageDisplayer( String from, String body, panelChat1 panel )
      {
         
         fromUser = from; // store originating user
         messageBody = body; // store message body
      } // end MessageDisplayer constructor

      // display new message in messageArea
      public void run()
      {
         // append new message
         area.exibir( "\n" + fromUser + "> " + messageBody );
      } // end method run
   } // end MessageDisplayer inner class